Ext.define('AM.view.deptView',{
	extend : 'Ext.tree.Panel',
	alias : 'widget.deptTree',
	title:'部门树',
	width:250,
	height:300,
	padding : '5 5 5 5',
	rootVisible:false,
	viewConfig: {
    	plugins: { ptype: 'treeviewdragdrop' }
	},
	dockedItems:[{
		xtype:'toolbar',
		dock:'left',
		items:[
			{text:'add',id:'add'},'-',
			{text:'copy',id:'copy'},'-', 
			{text:'delete',id:'delete'}
		]
	},{
		xtype:'toolbar',
		items:[
			{text:'展开全部',id:'allopen'},'-',
			{text:'收起全部',id:'allclose'}
		]
	}],
	root:{
		text:'root',
		id:'1',
		children:[{
			text:'技术部门',
			id:'01',
			leaf:false,
			checked:false,
			children:[{
				text:'研发部',
				id:'0101',
				checked:false,
				leaf:true
			},{
				text:'实施部',
				id:'0102',
				checked:false,
				leaf:true
			}]
		},{
			text:'后勤部门',
			id:'02',
			leaf:false,
			checked:false,
			children:[{
				text:'人事部',
				id:'0201',
				checked:false,
				leaf:true
			},{
				text:'行政部',
				id:'0202',
				checked:false,
				leaf:true
			}]
		}]
	}
});
